<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>系统后台 - Tpcms内容管理系统 - by Tpcms</title>
<?php if(CONTROLLER_NAME == "Login"): ?><link rel="stylesheet" type="text/css" href="/Data/Public/admin/css/admin_login.css"  />
<link rel="stylesheet" type="text/css" href="/Data/Public/admin/css/admin_default_color.css" />
<?php else: ?>
<link href="/Data/Public/admin/css/admin_style.css" rel="stylesheet" />
<link href="/Data/Public/org/artDialog/skins/default.css" rel="stylesheet" /><?php endif; ?>

<script type='text/javascript'>
MODULE='/index.php/Admin'; //当前模块
CONTROLLER='/index.php/Admin/AuthRule'; //当前控制器)
ACTION='/index.php/Admin/AuthRule/index';//当前方法(方法)
ROOT=''; //当前项目根路径
PUBLIC= '/Data/Public/admin';//当前定义的Public目录
</script>
<script src="/Data/Public/org/wind.js"></script>
<script src="/Data/Public/org/jquery.js"></script>
</head>
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
	<div class="nav">
		<ul class="cc">
			<li class="current"><a href="javascrip:;">规则列表</a></li>
			<li ><a href="<?php echo U('AuthRule/add');?>">添加规则</a></li>
			<li ><a href="<?php echo U('AuthRule/update_cache');?>">更新规则缓存</a></li>
		</ul>
	</div>
  <form name="myform" action="<?php echo U('AuthRule/sort');?>" method="post" class="J_ajaxForm">
  <div class="table_list">
    <table width="100%">
        <colgroup>
	        <col width="60">
	        <col width="55">
	        <col width="220">
	        <col>
	        <col width="200">
	        <col width="90">
	        <col width="90">
	        <col width="100">
        </colgroup>
        <thead>
          <tr>
          	<td>id</td>
            <td align='center'>排序</td>
            <td>规则标识</td>
            <td>规则名称</td>
            <td>条件</td>
            <td>状态</td>
            <td>显示</td>
            <td align='center'>管理操作</td>
          </tr>
        </thead>
		<?php if(is_array($rules)): $i = 0; $__LIST__ = $rules;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$value): $mod = ($i % 2 );++$i;?><tr>
        	<td>
				<?php echo ($value["id"]); ?>
			</td>
			<td align='center'>
				<input name='sort[<?php echo ($value["id"]); ?>]' type='text' size='3' value='<?php echo ($value["sort"]); ?>' class='input'>
			</td>
			<td ><?php echo ($value["name"]); ?></td>
			<td ><?php echo ($value["_name"]); ?></td>
			<td ><?php echo ($value["condition"]); ?></td>
			<td><?php if($value["status"] == 1): ?>启用<?php else: ?>禁用<?php endif; ?></td>
			<td><?php if($value["isnavshow"] == 1): ?>显示<?php else: ?>隐藏<?php endif; ?></td>
			<td align='center' >
				
				<a href="<?php echo U('AuthRule/edit',array('id'=>$value['id']));?>">修改</a> | 
				<a class="J_ajax_del" href="<?php echo U('AuthRule/del',array('id'=>$value['id']));?>">删除</a>  
			</td>
		</tr><?php endforeach; endif; else: echo "" ;endif; ?>
	</table>
    <div class="btn_wrap">
      <div class="btn_wrap_pd">
        <button class="btn btn_submit mr10 J_ajax_submit_btn" type="submit">排序</button>
      </div>
    </div>
  </div>

</form>
</div>
<script type="text/javascript" src="/Data/Public/admin/js/mod.common.js"></script></body>
</html>